module top_module( 
    input [2:0] a, b,
    input cin,
    output [2:0] cout,
    output [2:0] sum );

    adder1 inst_adder0 (a[0], b[0], cin, cout[0], sum[0]);
    adder1 inst_adder[2:1] (a[2:1], b[2:1], cout[1:0], cout[2:1], sum[2:1]);

endmodule

module adder1( 
    input a, b, cin,
    output cout, sum );

    assign{cout,sum} = a + b + cin;

endmodule